
import axios from 'axios';

/**
 * 模型数据类型
 */
export class ModelDataTypeService {
    // 分页查询列表
    static findModelDataTypes (queryParams) {
        return axios({
            url: '/lims/gen/ModelDataType/findModelDataTypes',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的模型数据类型
    static findModelDataType (modelDataTypeId) {
        const query = {
            modelDataTypeId
        }
        return axios({
            url: '/lims/gen/ModelDataType/findModelDataType',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的模型数据类型(包含外键名称)
    static findModelDataTypeForView (modelDataTypeId) {
        const query = {
            modelDataTypeId
        }
        return axios({
            url: '/lims/gen/ModelDataType/findModelDataTypeForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的模型数据类型(包含外键名称)
    static findModelDataTypeForEdit (modelDataTypeId) {
        const query = {
            modelDataTypeId
        }
        return axios({
            url: '/lims/gen/ModelDataType/findModelDataTypeForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的模型数据类型(只提取ID 和 Name)
    static findModelDataTypesWithIdNameById (modelDataTypeId) {
        const query = {
            modelDataTypeId
        }
        return axios({
            url: '/lims/gen/ModelDataType/findModelDataTypesWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询模型数据类型集合(只提取ID 和 Name)
    static findModelDataTypesWithIdNameByName (modelDataTypeName) {
        const query = {
            modelDataTypeName
        }
        return axios({
            url: '/lims/gen/ModelDataType/findModelDataTypesWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存模型数据类型
    static saveModelDataType (modelDataType) {
        const query = {}
        return axios({
            url: '/lims/gen/ModelDataType/saveModelDataType',
            method: 'POST',
            params: query,
            data: modelDataType
        });
    }

    //修改保存模型数据类型
    static updateModelDataType (modelDataType) {
        const query = {}
        return axios({
            url: '/lims/gen/ModelDataType/updateModelDataType',
            method: 'POST',
            params: query,
            data: modelDataType
        });
    }

    //根据ID查询指定的模型数据类型(只提取ID 和 Name)
    static deleteModelDataType (modelDataTypeId) {
        const query = {
            modelDataTypeId
        }
        return axios({
            url: '/lims/gen/ModelDataType/deleteModelDataType',
            method: 'POST',
            params: query,
        });
    }
}
